﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="Admin.WorkFlow.WorkFlowNode.Manage" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="/Themes/Default/Css/Style.css" rel="stylesheet" type="text/css" />
    <script src="/Jscript/CheckBox.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Components/EasyUI/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/Components/EasyUI/themes/icon.css" />
    <script src="/Jscript/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Components/EasyUI/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function myfunction() {
            $("select[name$='txtSearchFormName']").combobox();
            $("select[name$='txtFormName']").combobox();
        });
        function CheckFormContent() {
            $("input:[name$='hiddenSearchName']").eq(0).val($('#txtSearchFormName').combobox('getValue'));
        };
    </script>
    <title>节点设置</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table style="width: 900px;" cellpadding="2" cellspacing="1" border="0">
        <tr>
            <td>
                <table cellspacing="0" cellpadding="0" width="100%" border="1" bordercolordark="white"
                    bordercolorlight="#b7c9e9" style="padding-left: 3px">
                    <tr>
                        <td height="25" align="right" width="120px">
                           节点名称：
                        </td>
                        <td height="25" align="left" width="330px">
                            		<asp:TextBox id="txtNodeName" runat="server" Width="200px"></asp:TextBox>
                        </td>
                        <td height="25" align="right" width="120px">
                            默认接收人姓名：</td>
                        <td height="25" align="left">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                            <asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack=True 
                                    DataSourceID="SqlDataSource1" DataTextField="DepartMentName" 
                                    DataValueField="DepartMentId" 
                                    onselectedindexchanged="ddlDepartment_SelectedIndexChanged">
                            </asp:DropDownList>
                                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                                    SelectCommand="SELECT [DepartMentId], [DepartMentName] FROM [tb_MidSoft_DepartMent]">
                                </asp:SqlDataSource>
                            </ContentTemplate>
                            </asp:UpdatePanel>

                        </td>
                        <td height="25" align="left">
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                            <asp:DropDownList ID="ddlReceiveUser" runat="server" DataSourceID="SqlDataSource2" 
                                    DataTextField="UserName" DataValueField="UserAccount">
                            </asp:DropDownList>
                                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                                    SelectCommand="SELECT [UserAccount], [UserName] FROM [tb_MidSoft_Users] WHERE ([DepartMent] = @DepartMent)">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="ddlDepartment" Name="DepartMent" 
                                            PropertyName="SelectedValue" Type="String" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
                            </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" width="120px">
                           表单：
                        </td>
                        <td height="25" align="left" width="330px">
                            <asp:TextBox id="txtModifyForm" runat="server" Width="200px"></asp:TextBox>
                        </td>
                        <td height="25" align="right" width="120px">
                            节点值：
                        </td>
                        <td height="25" align="left" width="330px" colspan="2">
                            <asp:TextBox id="txtState" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" width="120px">
                           返回节点值：
                        </td>
                        <td height="25" align="left" width="330px">
                        	<asp:TextBox id="txtPreState" runat="server" Width="200px"></asp:TextBox>
                        </td>
                        <td height="25" align="right" width="120px">
                            下一节点值：
                        </td>
                        <td height="25" align="left" width="330px" colspan="2">
                            <asp:TextBox id="txtNextState" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" width="120px">
                           返回按钮文字：
                        </td>
                        <td height="25" align="left" width="330px">
                        	<asp:TextBox id="txtPreBtValue" runat="server" Width="200px"></asp:TextBox>
                        </td>
                        <td height="25" align="right" width="120px">
                           下一步按钮文字：
                        </td>
                        <td height="25" align="left" width="330px" colspan="2">
                            <asp:TextBox id="txtNextBtValue" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" width="120px">
                           节点类型：
                        </td>
                        <td height="25" align="left" width="330px">
                            <asp:DropDownList ID="ddlType" runat="server">
                                <asp:ListItem Value="0">普通节点</asp:ListItem>
                                <asp:ListItem Value="1">选人节点</asp:ListItem>
                                <asp:ListItem Value="2">送领导节点</asp:ListItem>
                                <asp:ListItem Value="3">发表单指定人员</asp:ListItem>
                                <asp:ListItem Value="4">发节点指定人员</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td height="25" align="right" width="120px">
                           接受表单值：
                        </td>
                        <td height="25" align="left" width="330px" colspan="2">
                            <asp:TextBox id="txtReceiveFormValue" runat="server" Width="200px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" width="120px">
                           接受节点值：
                        </td>
                        <td height="25" align="left" width="330px">
		                    <asp:TextBox id="txtReceiveNodeValue" runat="server" Width="200px"></asp:TextBox>
                        </td>
                        <td height="25" align="right" width="120px">
                           是否需要输入消息：
                        </td>
                        <td height="25" align="left" width="330px" colspan="2">
                            <asp:CheckBox ID="cboxHaveMsg" runat="server" Text="输入消息" />
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" width="120px">
                           默认消息内容：
                        </td>
                        <td height="25" align="left" width="330px">
		                    <asp:TextBox id="txtDefaultMsgContent" runat="server" Width="200px"></asp:TextBox>
                        </td>
                        <td height="25" align="right" width="120px">
                            是否有附件上传：
                        </td>
                        <td height="25" align="left" width="330px" colspan="2">
                            <asp:CheckBox ID="cboxAttach" runat="server" Text="上传附件" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="tdbg" align="center" valign="bottom">
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" class="inputbutton"
                    onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'">
                </asp:Button>
                <input type="button" value="关闭" class="inputbutton" onmouseover="this.className='inputbutton_hover'"
                    onmouseout="this.className='inputbutton'" onclick="javascript:window.parent.$('#Div1').dialog('close');" />
            </td>
        </tr>
    </table>
    <table style="width: 100%;" cellpadding="2" cellspacing="0" class="workspacesearch">
        <tr>
            <td class="dt" align="center">
                查询条件
            </td>
            <td style="width: 80px" align="center" class="tdbg">
                <b>节点名称：</b>
            </td>
            <td class="tdbg">
                <select id="txtSearchFormName" class="easyui-combobox" name="state" style="width: 200px;">
                </select>
            </td>
            <td style="width: 80px" align="center" class="tdbg">
            <input id="hiddenSearchName" type="hidden" runat="server" />
            </td>
            <td class="tdbg">
            </td>
            <td class="tdbg">
                <asp:ImageButton ID="imgBtnSearch" ImageUrl="/Themes/TheOne/images/btn_search.gif"
                    runat="server" OnClick="btnSearch_Click" OnClientClick="CheckFormContent();" />
            </td>
        </tr>
    </table>
    <table width="100%" cellpadding="0" cellspacing="0" border="0" class="formList">
        <tr>
            <td>
                <!--Search end-->
                <table height="220px" border="0" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td valign="top" height="200px">
                            <asp:GridView ID="gridView" runat="server" AllowPaging="True" Width="100%" CellPadding="4"
                                OnPageIndexChanging="gridView_PageIndexChanging" DataKeyNames="PmFlowNodeId" OnRowDataBound="gridView_RowDataBound"
                                AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" OnRowCreated="gridView_OnRowCreated"
                                ForeColor="#333333" OnRowDeleting="gridView_RowDeleting">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
		<asp:BoundField DataField="NodeName" HeaderText="节点名称" SortExpression="NodeName" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="DeafaultReceiveUserName" HeaderText="默认接收人姓名" SortExpression="DeafaultReceiveUserName" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="DeafaultReceiveUserAccount" HeaderText="默认接收人账号" SortExpression="DeafaultReceiveUserAccount" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="ModifyForm" HeaderText="表单" SortExpression="ModifyForm" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="State" HeaderText="节点值" SortExpression="State" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="PreState" HeaderText="返回节点值" SortExpression="PreState" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="NextState" HeaderText="下一节点值" SortExpression="NextState" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="PreBtValue" HeaderText="返回按钮文字" SortExpression="PreBtValue" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="NextBtValue" HeaderText="下一步按钮文字" SortExpression="NextBtValue" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="NodeType" HeaderText="节点类型" SortExpression="NodeType" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="ReceiveFormValue" HeaderText="接受表单值" SortExpression="ReceiveFormValue" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="ReceiveNodeValue" HeaderText="接受节点值" SortExpression="ReceiveNodeValue" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="HaveMsgNode" HeaderText="是否需要输入消息" SortExpression="HaveMsgNode" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="DefaultMsgContent" HeaderText="默认消息内容" SortExpression="DefaultMsgContent" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="HaveAttach" HeaderText="是否有附件上传" SortExpression="HaveAttach" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="CreateTime" HeaderText="创建时间" SortExpression="CreateTime" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:yyyy-MM-dd}" /> 
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#598cbf" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle HorizontalAlign="Center" BackColor="#F7F6F3" ForeColor="#333333"></RowStyle>
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CssClass=""
                                FirstPageText="首页" HorizontalAlign="Right" LastPageText="末页" NextPageText="下一页"
                                PageIndexBoxType="TextBox" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Always"
                                ShowPageIndexBox="Always" OnPageChanged="AspNetPager1_PageChanged" PageSize="6">
                            </webdiyer:AspNetPager>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
